package cqrtplm.service;

import com.alibaba.fastjson.JSONObject;
import com.hustcad.plm.pdm.file.model.dto.ContentUploadDTO;
import cqrtplm.dto.OnlineAnnotationDTO;
import cqrtplm.dto.ProblemReportDTO;
import cqrtplm.entity.RtChangeLockInfoDO;
import cqrtplm.vo.OnlineAnnotationVO;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigInteger;
import java.util.LinkedHashMap;
import java.util.List;

public interface RTChangeService {
    void createProblemReport(ProblemReportDTO dto, List<String> comment, List<MultipartFile> files) throws Exception;

    void uploadOnlineAnnotationFile(OnlineAnnotationDTO list);

    List<OnlineAnnotationVO> selectOnlineAnnotationByOid(String oid);

    void createProblemReportByAnnotation(List<String> list) throws Exception;

    int deleteOnlineAnnotationFile(String oid);

    String checkBomCertPattern(LinkedHashMap<String,Object> map) throws Exception;

    /**
     * 零件库存查询
     *
     * @param map
     * @return
     * @throws Exception
     */
    List<JSONObject> queryPartInventory(LinkedHashMap<String,Object> map) throws Exception;

    /**
     * 零件库存保存
     *
     * @param map
     * @return
     * @throws Exception
     */
    List<JSONObject> savePartInventory(LinkedHashMap<String,Object> map) throws Exception;

    /**
     * 查询成品码状态
     *
     * @param list
     * @return
     * @throws Exception
     */
    List<JSONObject> queryProductCodeStatus(List<JSONObject> list) throws Exception;


    List<ContentUploadDTO> batchUploadFile(List<MultipartFile> file, BigInteger workFlowContainerId);

    /**
     * 查询成品码订单信息
     *
     * @param map
     * @return
     * @throws Exception
     */
    List<JSONObject> queryProductOrderList(LinkedHashMap<String,Object> map) throws Exception;

    /**
     * 成品订单保存
     *
     * @param map
     * @return
     * @throws Exception
     */
    String saveProductOrderList(LinkedHashMap<String,Object> map) throws Exception;

    /**
     * 获取用户所在部门
     * @param oid
     * @return
     * @throws Exception
     */
    String getOrgNameByUserOid(String oid)throws Exception;

    /**
     * 获取受影响的MBOM
     * @param reqMap
     * @return
     */
    JSONObject getChangeImpactMbom(LinkedHashMap<String,Object> reqMap) throws Exception;
    /**
     * 保存受影响的MBOM
     * @param reqMap
     * @return
     */
    String saveChangeImpactMbom(LinkedHashMap<String,Object> reqMap) throws Exception;
    /**
     * 获取已保存受影响的MBOM
     * @param reqMap
     * @return
     */
    JSONObject getSaveChangeImpactMbom(LinkedHashMap<String,Object> reqMap) throws Exception;

    /**
     * 锁定成品码下单
     * @param reqMap
     * @return
     */
    String lockProductOrder(LinkedHashMap<String,Object> reqMap);
    /**
     * 查看成品码锁定信息
     * @param
     * @return
     */
    List<RtChangeLockInfoDO> getLockProductOrder(String changeNo, String partNumber, String productCode);
}
